<?php
/*
    GUMUD is Extensible Web-based Multi-User Dungeon Software.

    Copyright (C) 2013  White Rabbit

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$itx['config']['com-front'] = getLocalConfig("com-front");
$cxtpl = new XTemplate(pathprivate.'localization/'.$itx['user']['lang'].'/Components/com-' . $itx['get']['com'] . '/xtpl/'.$itx['get']['action'].'.xtpl');
$cxtpl->assign("token",$token);

$itx['com-user'][1] = file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=getuser&firstname=".$_COOKIE['first']."&lastname=".$_COOKIE['last']);
$cxtpl->assign("first",$itx['user']['user-info']['avatarFirst']);
$cxtpl->assign("last",$itx['user']['user-info']['avatarLast']);
$cxtpl->assign("exp",$itx['user']['user-info']['expPoints']);
$cxtpl->assign("charclass",$itx['user']['user-info']['characterClass']);
$cxtpl->assign("lvl",$itx['user']['user-info']['level']);
$itx['com-user'][2] = file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=requestGuildMem&uuid=".$itx['com-user'][1]);
$itx['com-user'][3] = file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=requestGuildName&uuid=".$itx['com-user'][2]);
$cxtpl->assign("guild",$itx['com-user'][3]);
$cxtpl->assign("email",file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=getUserEmail&uuid=".$itx['com-user'][1]."&passhash=".$_COOKIE['pass']));
$cxtpl->assign("lex",file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=GETxchangeLex&uuid=".$itx['com-user'][1]));
$cxtpl->assign("walletbalance",file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=GETxchangeWallet&uuid=".$itx['com-user'][1]));
$cxtpl->assign("gold",file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=GETxchangeGold&uuid=".$itx['com-user'][1]));
$cxtpl->assign("mana",file_get_contents("http://".gridURL."/index.php?scripthandshakeID=".scripthandshakeID."&request=GETxchangeMana&uuid=".$itx['com-user'][1]));
$cxtpl->parse("component.aer2");
$cxtpl->parse("component");
$itx['block']['com'] = $cxtpl->iout("component");
$itx['page']['name'] = "Home";
?>
